package com.dailyblue.example.springcloud.sentinel.consumer.feign.fallback;

import com.dailyblue.example.springcloud.commons.util.JsonResult;
import com.dailyblue.example.springcloud.commons.util.ResultTool;
import com.dailyblue.example.springcloud.sentinel.consumer.feign.SentinelProviderFeign;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class SentinelProviderFeignFallback implements SentinelProviderFeign {
    @Override
    public JsonResult a() {
        return null;
    }

    @Override
    public JsonResult b() {
        return null;
    }

    @Override
    public JsonResult c() {
        return null;
    }

    @Override
    public JsonResult h(int index) {
        log.info("进入了兜底方案，index:{}", index);
        return ResultTool.fail(101, "error");
    }
}
